import request from '/@/utils/request';

/**
 * 品牌
 * @param params 要传的参数值
 * @returns 返回接口数据
 * 品牌api接口集合
 */
export function useBrandApi() {
	return {
		getBrandList: (data) => {
			return request({
				url: '/product/admin/brand/list',
				method: 'post',
				data,
			});
		},
		getBrandDetail: (params) => {
			return request({
				url: `/product/admin/brand/detail/${params}`,
				method: 'get',
			});
		},
		delBrandById: (params) => {
			return request({
				url: `/product/admin/brand/delete/${params}`,
				method: 'get',
			});
		},
		addBrand: (data) => {
			return request({
				url: '/product/admin/brand/add',
				method: 'post',
				data,
			});
		},
		editBrand: (data) => {
			return request({
				url: '/product/admin/brand/update',
				method: 'post',
				data,
			});
		},
	};
}
